package com.kuaidi100.sdk.response;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * @Author: api.kuaidi100.com
 * @Date: 2020-07-17 19:31
 */
public class PrintHtmlData {
    /**
     * html代码
     */
    private List<String> template;
    /**
     * 快递单号
     */
    private String kuaidinum;
    /**
     * 大头笔
     */
    private String bulkpen;
    /**
     * 电子面单链接
     */
    private List<String> templateurl;
    /**
     * 子单号
     */
    private String childNum;

    @Override
    public String toString() {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(this);
        } catch (Exception e) {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                    .append("template", template)
                    .append("kuaidinum", kuaidinum)
                    .append("bulkpen", bulkpen)
                    .append("templateurl", templateurl)
                    .append("childNum", childNum)
                    .toString();
        }
    }

    public List<String> getTemplate() {
        return template;
    }

    public void setTemplate(List<String> template) {
        this.template = template;
    }

    public String getKuaidinum() {
        return kuaidinum;
    }

    public void setKuaidinum(String kuaidinum) {
        this.kuaidinum = kuaidinum;
    }

    public String getBulkpen() {
        return bulkpen;
    }

    public void setBulkpen(String bulkpen) {
        this.bulkpen = bulkpen;
    }

    public List<String> getTemplateurl() {
        return templateurl;
    }

    public void setTemplateurl(List<String> templateurl) {
        this.templateurl = templateurl;
    }

    public String getChildNum() {
        return childNum;
    }

    public void setChildNum(String childNum) {
        this.childNum = childNum;
    }
}
